import { Action, InternalIconActionsName } from "@/components/GuatActions/types";
import { ButtonType } from "@/components/GuatButtonGroup/types";

export enum ButtonInternalStyle {
  /**
   * @color 主色
   * @size  大号
   * @shape 圆弧
   */
  PLR = "primaryLargeRound",

  /**
   * @color 橙色
   * @size  大号
   * @shape 圆弧
   */
  OLR = "orangeLargeRound",

  /**
   * @color 红色
   * @size  大号
   * @shape 圆弧
   */
  RLR = "redLargeRound",

  /**
   * @color 绿色
   * @size  大号
   * @shape 圆弧
   */
  GLR = "greenLargeRound",

  /**
   * @color 主色
   * @size  大号
   * @shape 轮廓
   */
  PLO = "primaryLargeOutline",

  /**
   * @color 橙色
   * @size  大号
   * @shape 轮廓
   */
  OLO = "orangeLargeOutline",

  /**
   * @color 红色
   * @size  大号
   * @shape 轮廓
   */
  RLO = "redLargeOutline",

  /**
   * @color 绿色
   * @size  大号
   * @shape 轮廓
   */
  GLO = "greenLargeOutline",
}

export const buttons: ObjectType<Pick<ButtonType, "type" | "shape" | "size" | "status">> = {
  [ButtonInternalStyle.PLR]: {
    size: "large",
    shape: "round",
    type: "primary",
  },
  [ButtonInternalStyle.RLR]: {
    size: "large",
    shape: "round",
    type: "primary",
    status: "danger",
  },
  [ButtonInternalStyle.PLO]: {
    size: "large",
    type: "outline",
    shape: "round",
  },
  [ButtonInternalStyle.OLR]: {
    size: "large",
    type: "primary",
    shape: "round",
    status: "warning",
  },
};

export const iconButtons: Record<
  InternalIconActionsName,
  {
    icon: string;
    color: Action["color"];
  }
> = {
  edit: {
    icon: "ph:pencil-line",
    color: "blue",
  },
  delete: {
    icon: "ph:trash",
    color: "red",
  },
  check: {
    icon: "ph:eye",
    color: "orange",
  },
  withdraw: {
    icon: "ph:arrow-counter-clockwise",
    color: "blue",
  },
};
